import React from "react";
import ReactDOM from "react-dom/client";

// 创建挂载点容器
const root = ReactDOM.createRoot(document.querySelector("#root"));

const html = <div>Hello React</div>;
console.log(html); // React元素、React节点、React虚拟DOM、React虚拟节点

const VDOM = (
  <div>
    <h1>Hello</h1>
    <button>点我</button>
  </div>
);
console.log(VDOM);

// React元素，创建出来之后，是不允许修改的
html.type = "h1";

// 渲染容器
root.render(html);
